Integrand size = 15, antiderivative size = 62 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=-\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^2}-\frac {(a+3 b) \text {arctanh}(\cos (x))}{2 (a+b)^2}-\frac {\cot (x) \csc (x)}{2 (a+b)} \]
[Out]
Time = 0.10 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {3269, 425, 536, 212, 211} \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=-\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^2}-\frac {(a+3 b) \text {arctanh}(\cos (x))}{2 (a+b)^2}-\frac {\cot (x) \csc (x)}{2 (a+b)} \]
[In]
[Out]
Rule 211
Rule 212
Rule 425
Rule 536
Rule 3269
Rubi steps \begin{align*} \text {integral}& = -\text {Subst}\left (\int \frac {1}{\left (1-x^2\right )^2 \left (a+b x^2\right )} \, dx,x,\cos (x)\right ) \\ & = -\frac {\cot (x) \csc (x)}{2 (a+b)}-\frac {\text {Subst}\left (\int \frac {a+2 b+b x^2}{\left (1-x^2\right ) \left (a+b x^2\right )} \, dx,x,\cos (x)\right )}{2 (a+b)} \\ & = -\frac {\cot (x) \csc (x)}{2 (a+b)}-\frac {b^2 \text {Subst}\left (\int \frac {1}{a+b x^2} \, dx,x,\cos (x)\right )}{(a+b)^2}-\frac {(a+3 b) \text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (x)\right )}{2 (a+b)^2} \\ & = -\frac {b^{3/2} \arctan \left (\frac {\sqrt {b} \cos (x)}{\sqrt {a}}\right )}{\sqrt {a} (a+b)^2}-\frac {(a+3 b) \text {arctanh}(\cos (x))}{2 (a+b)^2}-\frac {\cot (x) \csc (x)}{2 (a+b)} \\ \end{align*}
Leaf count is larger than twice the leaf count of optimal. \(140\) vs. \(2(62)=124\).
Time = 0.43 (sec) , antiderivative size = 140, normalized size of antiderivative = 2.26 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=\frac {-8 b^{3/2} \arctan \left (\frac {\sqrt {b}-\sqrt {a+b} \tan \left (\frac {x}{2}\right )}{\sqrt {a}}\right )-8 b^{3/2} \arctan \left (\frac {\sqrt {b}+\sqrt {a+b} \tan \left (\frac {x}{2}\right )}{\sqrt {a}}\right )+\sqrt {a} \left (-\left ((a+b) \csc ^2\left (\frac {x}{2}\right )\right )-4 (a+3 b) \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )+(a+b) \sec ^2\left (\frac {x}{2}\right )\right )}{8 \sqrt {a} (a+b)^2} \]
[In]
[Out]
Time = 0.41 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.53
method | result | size |
default | \(\frac {1}{\left (4 a +4 b \right ) \left (1+\cos \left (x \right )\right )}+\frac {\left (-a -3 b \right ) \ln \left (1+\cos \left (x \right )\right )}{4 \left (a +b \right )^{2}}-\frac {b^{2} \arctan \left (\frac {b \cos \left (x \right )}{\sqrt {a b}}\right )}{\left (a +b \right )^{2} \sqrt {a b}}+\frac {1}{\left (4 a +4 b \right ) \left (\cos \left (x \right )-1\right )}+\frac {\left (a +3 b \right ) \ln \left (\cos \left (x \right )-1\right )}{4 \left (a +b \right )^{2}}\) | \(95\) |
risch | \(\frac {{\mathrm e}^{3 i x}+{\mathrm e}^{i x}}{\left ({\mathrm e}^{2 i x}-1\right )^{2} \left (a +b \right )}+\frac {\ln \left ({\mathrm e}^{i x}-1\right ) a}{2 a^{2}+4 a b +2 b^{2}}+\frac {3 \ln \left ({\mathrm e}^{i x}-1\right ) b}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {\ln \left ({\mathrm e}^{i x}+1\right ) a}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {3 \ln \left ({\mathrm e}^{i x}+1\right ) b}{2 \left (a^{2}+2 a b +b^{2}\right )}-\frac {i \sqrt {a b}\, b \ln \left ({\mathrm e}^{2 i x}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i x}}{b}+1\right )}{2 a \left (a +b \right )^{2}}+\frac {i \sqrt {a b}\, b \ln \left ({\mathrm e}^{2 i x}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i x}}{b}+1\right )}{2 a \left (a +b \right )^{2}}\) | \(206\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 124 vs. \(2 (50) = 100\).
Time = 0.28 (sec) , antiderivative size = 274, normalized size of antiderivative = 4.42 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=\left [\frac {2 \, {\left (b \cos \left (x\right )^{2} - b\right )} \sqrt {-\frac {b}{a}} \log \left (\frac {b \cos \left (x\right )^{2} - 2 \, a \sqrt {-\frac {b}{a}} \cos \left (x\right ) - a}{b \cos \left (x\right )^{2} + a}\right ) + 2 \, {\left (a + b\right )} \cos \left (x\right ) - {\left ({\left (a + 3 \, b\right )} \cos \left (x\right )^{2} - a - 3 \, b\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + {\left ({\left (a + 3 \, b\right )} \cos \left (x\right )^{2} - a - 3 \, b\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{4 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, a b - b^{2}\right )}}, -\frac {4 \, {\left (b \cos \left (x\right )^{2} - b\right )} \sqrt {\frac {b}{a}} \arctan \left (\sqrt {\frac {b}{a}} \cos \left (x\right )\right ) - 2 \, {\left (a + b\right )} \cos \left (x\right ) + {\left ({\left (a + 3 \, b\right )} \cos \left (x\right )^{2} - a - 3 \, b\right )} \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) - {\left ({\left (a + 3 \, b\right )} \cos \left (x\right )^{2} - a - 3 \, b\right )} \log \left (-\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right )}{4 \, {\left ({\left (a^{2} + 2 \, a b + b^{2}\right )} \cos \left (x\right )^{2} - a^{2} - 2 \, a b - b^{2}\right )}}\right ] \]
[In]
[Out]
\[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=\int \frac {\csc ^{3}{\left (x \right )}}{a + b \cos ^{2}{\left (x \right )}}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 105 vs. \(2 (50) = 100\).
Time = 0.34 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.69 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=-\frac {b^{2} \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a b}} - \frac {{\left (a + 3 \, b\right )} \log \left (\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {{\left (a + 3 \, b\right )} \log \left (\cos \left (x\right ) - 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {\cos \left (x\right )}{2 \, {\left ({\left (a + b\right )} \cos \left (x\right )^{2} - a - b\right )}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 103 vs. \(2 (50) = 100\).
Time = 0.33 (sec) , antiderivative size = 103, normalized size of antiderivative = 1.66 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=-\frac {b^{2} \arctan \left (\frac {b \cos \left (x\right )}{\sqrt {a b}}\right )}{{\left (a^{2} + 2 \, a b + b^{2}\right )} \sqrt {a b}} - \frac {{\left (a + 3 \, b\right )} \log \left (\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {{\left (a + 3 \, b\right )} \log \left (-\cos \left (x\right ) + 1\right )}{4 \, {\left (a^{2} + 2 \, a b + b^{2}\right )}} + \frac {\cos \left (x\right )}{2 \, {\left (\cos \left (x\right )^{2} - 1\right )} {\left (a + b\right )}} \]
[In]
[Out]
Time = 3.02 (sec) , antiderivative size = 1138, normalized size of antiderivative = 18.35 \[ \int \frac {\csc ^3(x)}{a+b \cos ^2(x)} \, dx=\ln \left (\cos \left (x\right )-1\right )\,\left (\frac {b}{2\,{\left (a+b\right )}^2}+\frac {1}{4\,\left (a+b\right )}\right )-\frac {\cos \left (x\right )}{2\,{\sin \left (x\right )}^2\,\left (a+b\right )}-\frac {\ln \left (\cos \left (x\right )+1\right )\,\left (a+3\,b\right )}{4\,{\left (a+b\right )}^2}-\frac {\mathrm {atan}\left (\frac {\frac {\sqrt {-a\,b^3}\,\left (\frac {\cos \left (x\right )\,\left (a^2\,b^3+6\,a\,b^4+13\,b^5\right )}{4\,\left (a^2+2\,a\,b+b^2\right )}+\frac {\left (\frac {2\,a^5\,b^2+12\,a^4\,b^3+28\,a^3\,b^4+32\,a^2\,b^5+18\,a\,b^6+4\,b^7}{2\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}-\frac {\cos \left (x\right )\,\sqrt {-a\,b^3}\,\left (-16\,a^5\,b^2-48\,a^4\,b^3-32\,a^3\,b^4+32\,a^2\,b^5+48\,a\,b^6+16\,b^7\right )}{8\,\left (a^2+2\,a\,b+b^2\right )\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,\sqrt {-a\,b^3}}{2\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,1{}\mathrm {i}}{a^3+2\,a^2\,b+a\,b^2}+\frac {\sqrt {-a\,b^3}\,\left (\frac {\cos \left (x\right )\,\left (a^2\,b^3+6\,a\,b^4+13\,b^5\right )}{4\,\left (a^2+2\,a\,b+b^2\right )}-\frac {\left (\frac {2\,a^5\,b^2+12\,a^4\,b^3+28\,a^3\,b^4+32\,a^2\,b^5+18\,a\,b^6+4\,b^7}{2\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}+\frac {\cos \left (x\right )\,\sqrt {-a\,b^3}\,\left (-16\,a^5\,b^2-48\,a^4\,b^3-32\,a^3\,b^4+32\,a^2\,b^5+48\,a\,b^6+16\,b^7\right )}{8\,\left (a^2+2\,a\,b+b^2\right )\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,\sqrt {-a\,b^3}}{2\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,1{}\mathrm {i}}{a^3+2\,a^2\,b+a\,b^2}}{\frac {\frac {3\,b^5}{2}+\frac {a\,b^4}{2}}{a^3+3\,a^2\,b+3\,a\,b^2+b^3}-\frac {\sqrt {-a\,b^3}\,\left (\frac {\cos \left (x\right )\,\left (a^2\,b^3+6\,a\,b^4+13\,b^5\right )}{4\,\left (a^2+2\,a\,b+b^2\right )}+\frac {\left (\frac {2\,a^5\,b^2+12\,a^4\,b^3+28\,a^3\,b^4+32\,a^2\,b^5+18\,a\,b^6+4\,b^7}{2\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}-\frac {\cos \left (x\right )\,\sqrt {-a\,b^3}\,\left (-16\,a^5\,b^2-48\,a^4\,b^3-32\,a^3\,b^4+32\,a^2\,b^5+48\,a\,b^6+16\,b^7\right )}{8\,\left (a^2+2\,a\,b+b^2\right )\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,\sqrt {-a\,b^3}}{2\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )}{a^3+2\,a^2\,b+a\,b^2}+\frac {\sqrt {-a\,b^3}\,\left (\frac {\cos \left (x\right )\,\left (a^2\,b^3+6\,a\,b^4+13\,b^5\right )}{4\,\left (a^2+2\,a\,b+b^2\right )}-\frac {\left (\frac {2\,a^5\,b^2+12\,a^4\,b^3+28\,a^3\,b^4+32\,a^2\,b^5+18\,a\,b^6+4\,b^7}{2\,\left (a^3+3\,a^2\,b+3\,a\,b^2+b^3\right )}+\frac {\cos \left (x\right )\,\sqrt {-a\,b^3}\,\left (-16\,a^5\,b^2-48\,a^4\,b^3-32\,a^3\,b^4+32\,a^2\,b^5+48\,a\,b^6+16\,b^7\right )}{8\,\left (a^2+2\,a\,b+b^2\right )\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )\,\sqrt {-a\,b^3}}{2\,\left (a^3+2\,a^2\,b+a\,b^2\right )}\right )}{a^3+2\,a^2\,b+a\,b^2}}\right )\,\sqrt {-a\,b^3}\,1{}\mathrm {i}}{a^3+2\,a^2\,b+a\,b^2} \]
[In]
[Out]